package study.Lambda2;

/**
 * 用@FunctionalInterface，去除if/else
 */
public class Main {
    public static void main(String[] args) {
        CaculateMap caculateMap = new CaculateMap();
        System.out.println(caculateMap.caculate("add", 1, 2));
        System.out.println(caculateMap.caculate("multiply", 1, 2));
        System.out.println(caculateMap.caculate("subtract", 1, 2));
        System.out.println(caculateMap.caculate("round", 5, 3));
    }
}
